package com.acwing.partition9;

import java.io.*;

/**
 * @author `RKC`
 * @date 2021/12/9 15:24
 */
public class AC891Nim游戏 {

    public static void main(String[] args) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(System.out));
        String[] s = reader.readLine().split(" ");
        int n = Integer.parseInt(s[0]);
        int[] stones = new int[n];
        s = reader.readLine().split(" ");
        for (int i = 0; i < n; i++) stones[i] = Integer.parseInt(s[i]);
        if (gameTheory(stones)) writer.write("Yes\n");
        else writer.write("No\n");
        writer.flush();
    }

    private static boolean gameTheory(int[] stones) {
        int res = stones[0];
        for (int i = 1; i < stones.length; i++) res ^= stones[i];
        return res != 0;
    }
}
